<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
    pageContext.setAttribute("PAGETITLE", "登录");
%>
<%@ include file="/pages/include/header.jsp" %>

<style>
<!--
/* your css code */
-->
</style>

<script type="text/javascript">
<!--
function cmd(command, params) {
    switch (command) {
	    case "login":
		    var ln = $E("loginName").value;
		    var lp = $E("loginPassword").value;
		    if ("" === ln || "" === lp) {
		        var ar = $("#action_result");
		        ar.html("登录名或密码不能为空");
	            ar.addClass("action_result_0");
	            $C.showTips({selector: "#action_result", position: $C.P_LEFT, hide: true});
            } else {
                $E("loginForm").submit();
            }
	        break;
    }
}

$(document).ready(function () {
    var ar = $("#action_result");
    var html = ar.html();
    if ("" !== html) {
	    var i = parseInt(html);
	    if (0 === i) {
		    ar.html("登录失败");
		    ar.addClass("action_result_0");
	        $C.showTips({selector: "#action_result", position: $C.P_LEFT, hide: true});
        }
    } else {
        $("#action_result").animate({left: -100}, 0);
    }
});
//-->
</script>

<body>

    <div>
        <div id="action_result" class="action_result">0</div>
    </div>

    <table class="loginTable" cellpadding="0" cellspacing="0" align="center">
        <tr>
            <td align="center" valign="middle">
                <form action="${ctx}/action/login.do" method="post" id="loginForm">
                    <input type="hidden" name="method" value="login" />
                
                    <table width="300px" height="100%" cellpadding="0" cellspacing="0" border="1">
                        <tr>
                            <td class="label" width="30%">登录名：</td>
                            <td title="value" width="70%"><input type="text" id="loginName" name="loginName" style="width: 98%" /></td>
                        </tr>
                        <tr>
                            <td class="label">登录密码：</td>
                            <td class="value"><input type="password" id="loginPassword" name="loginPassword" style="width: 98%" /></td>
                        </tr>
                        <tr>
                            <td colspan="2"><input type="button" value="登录" onclick="cmd('login')" /></td>
                        </tr>
                    </table>
                </form>
            </td>
        </tr>
    </table>

</body>

<script type="text/javascript">
<!--
// your js code
//-->
</script>

<%@ include file="/pages/include/footer.jsp" %>
